package bma.common.langutil.jmshell.jvm;

import bma.common.langutil.jmshell.Session;
import bma.common.langutil.jmshell.cmdopt.CommandOptionParser;
import bma.common.langutil.jmshell.command.AbstractSimpleCommandProcessor;

public class JVMGCCommand extends AbstractSimpleCommandProcessor {

	public JVMGCCommand() {
		super("gc");
	}

	@Override
	public CommandOptionParser createCommandOption(Session session) {
		CommandOptionParser r = new CommandOptionParser();
		return r;
	}

	@Override
	public boolean processCommand(Session session, String cmd,
			CommandOptionParser options) {
		Runtime.getRuntime().gc();
		session.writeln("gc done");
		return true;
	}
}